package cn.tedu.demo;

import java.util.Scanner;

/**
 * @author CCFu
 * @version 1.0
 * @date 2021/11/27 15:01
 */
public class FeiBo {
    public static void main(String[] args) {
        m1();
    }

    private static void m1() {
        System.out.println("请输入数字：");
        int a = new Scanner(System.in).nextInt();
        int [] arr = new int[a];
        if (a==1||a==2){
            System.out.println(1);
        } else{
            arr[0] = 1;
            arr[1] = 1;
            for (int i = 2; i <arr.length; i++) {
                arr[i]=arr[i-1]+arr[i-2];
            }
            System.out.println(arr[arr.length-1]);
        }
        m1();

    }

}
